package com.study.annotation;


import org.springframework.context.annotation.*;

//@Configuration
@ComponentScan(value = "com.study.annotation"
        //excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,classes = Controller.class)},
//        includeFilters = {@ComponentScan.Filter(type = FilterType.CUSTOM,classes = {MyTypeFilter.class})},
//        useDefaultFilters = false
)

public class MainConfig3 {
    @Bean("linux")
    public Person person(){
        System.out.println("实例化person");
        return new Person("linux");
    }

    @Bean("windows")
    @Conditional(MyCondition.class)
    public Person person1(){
        System.out.println("实例化person");
        return new Person("windows");
    }

}
